package org.sny7.openOfflineList.bean;


public class Game extends GameModel {
	
	private String generateReleaseNumber() {
		String releaseNumber = this.getReleaseNumber();
		while (releaseNumber.length() < 4) {
			releaseNumber = "0" + releaseNumber;
		}
		return releaseNumber;
	}

	public String getText() {
		String text = "%u - %n";
		text = text.replaceAll("%n", this.getTitle());
		text = text.replaceAll("%p", this.getPublisher());
		text = text.replaceAll("%u", this.generateReleaseNumber());
		return text;
	}
	
}
